package com.welleys.test.servlet.http.apply;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(name = "PreProcQueryReqServlet", urlPatterns = "/PreProcQueryReqServlet")
public class PreProcQueryReqServlet extends HttpServlet {
    /**
     * for query
     *
     * @param req
     * @param resp
     * @throws ServletException
     * @throws IOException
     */
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //gain params
        //gain specified param val or vals by name
        String paramval = req.getParameter("paramname");
        String[] paramvals = req.getParameterValues("paramname");

        //todo:welleys go on to find below methods usage
        req.getParameterMap();
        req.getParameterNames();

    }

    /**
     * for transfer data, like file, img, .etc
     *
     * @param req
     * @param resp
     * @throws ServletException
     * @throws IOException
     */
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doPost(req, resp);
    }
}
